<?php

namespace app\crm\validate;


use think\Validate;

/**
 * Class Article
 * @package app\admin\validate
 */
class CustomerPrestockGoods extends Validate
{

    /**
     * 验证规则
     * @var string[]
     */
    protected $rule = [
        'id'                 => 'require|number|gt:0',
        'num'            => 'require|gt:0',
        'reason'            => 'require',
    ];

    /**
     * 错误信息
     * @var string[]
     */
    protected $message = [
        'id.require'                 => '参数错误',
        'id.number'                  => '参数错误',
        'id.gt'                      => '参数错误',
        'num.require'            => '请选择退/出货数量',
        'num.gt'                 => '请选择退/出货数量',
        'reason.require'        =>  '请填写备注'
    ];

    /**
     * 验证场景
     * @var string[]
     */
    protected $scene = [
        'create' => ['id', 'num','reason'],
    ];

}
